//
//  TXTechnologyMenuListCell.swift
//  crm
//
//  Created by YiFang on 2024/6/13.
//

import UIKit

class TXTechnologyMenuListCell: UITableViewCell {
    
    @IBOutlet weak var selView: UIView!
    @IBOutlet weak var selBtn: UIButton!
    @IBOutlet weak var arrowRightView: UIView!
    @IBOutlet weak var nameLabel: UILabel!
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
        
        // Configure the view for the selected state
    }
    
    func setModel(model: TXTechnologyMenuListModel) {
        selBtn.isSelected = model.isSelect
        let countStr = model.children.count > 0 ? "(\(model.children.count))" : ""
        nameLabel.text = "\(model.label) \(countStr)"
        arrowRightView.isHidden = model.children.count <= 0
    }
}
